<?php if (!defined('THINK_PATH')) exit(); /*a:6:{s:77:"D:\phpstudy_pro\WWW\thinkphp\public/../application/home\view\index\index.html";i:1646981036;s:62:"D:\phpstudy_pro\WWW\thinkphp\application\home\view\layout.html";i:1646187914;s:67:"D:\phpstudy_pro\WWW\thinkphp\application\home\view\common\meta.html";i:1646883056;s:69:"D:\phpstudy_pro\WWW\thinkphp\application\home\view\common\script.html";i:1646187914;s:69:"D:\phpstudy_pro\WWW\thinkphp\application\home\view\common\header.html";i:1646792837;s:69:"D:\phpstudy_pro\WWW\thinkphp\application\home\view\common\footer.html";i:1646187914;}*/ ?>
<!DOCTYPE html>
<html>
<head>
  <!-- 头部信息 -->
  <meta charset="utf-8">
  <title><?php echo $System['SiteName']; ?></title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="<?php echo $System['keywords']; ?>">
  <meta name="description" content="<?php echo $System['description']; ?>">
  <link rel="shortcut icon" href="<?php echo $System['SiteLogo']; ?>" />
  
  <link rel="stylesheet" href="/assets/home/layui/css/layui.css">
  <link rel="stylesheet" href="/assets/home/css/global.css">

  <!-- 自己新建的公共的样式 -->
  <link rel="stylesheet" href="/assets/home/css/common.css" />

  <!-- JS文件 -->
  <script src="/assets/home/layui/layui.js"></script>
<script>
    //预加载
    window.onload = function(){
      layui.cache.page = '';
      layui.cache.user = {
        username: '游客'
        ,uid: -1
        ,avatar: '/assets/home/images/avatar/00.jpg'
        ,experience: 83
        ,sex: '男'
      };
      layui.config({
        version: "3.0.0"
        ,base: '/assets/home/mods/' //这里实际使用时，建议改成绝对路径
      }).extend({
        fly: 'index'
      }).use('fly');
    }
</script>
</head>
<body>
  <!-- hearder文件 -->
  <div class="fly-header layui-bg-black">
  <div class="layui-container">
    <a class="fly-logo" href="/">
      <img src="/assets/home/images/logo.png" alt="layui">
    </a>
    
    <ul class="layui-nav fly-nav-user">
      
      <!-- 登入后的状态  条件判断-->
      <?php if(\think\Cookie::get('LoginUser')): ?>
        <li class="layui-nav-item">
          <a class="fly-nav-avatar" href="javascript:;">
            <cite class="layui-hide-xs"><?php echo \think\Cookie::get('LoginUser')['nickname']; ?></cite>
            <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：layui 作者"></i>
            <i class="layui-badge fly-badge-vip layui-hide-xs">VIP<?php echo \think\Cookie::get('LoginUser')['vip']; ?></i>
            <img src="<?php echo \think\Cookie::get('LoginUser')['avatar']; ?>">
          </a>
          <dl class="layui-nav-child">
            <dd>
              <a href="<?php echo url('home/user/index'); ?>"><i class="layui-icon"
                  style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页
              </a>
            </dd>
            <dd>
              <a href="<?php echo url('home/user/user'); ?>"><i class="layui-icon">&#xe620;</i>基本设置</a>
            </dd>
            <dd>
              <a href="<?php echo url('home/post/index'); ?>"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的帖子</a>
            </dd>
            <hr style="margin: 5px 0;">
            <dd><a href="<?php echo url('home/index/logout'); ?>" style="text-align: center;">退出</a></dd>
          </dl>
        </li>
      <?php else: ?>
        <!-- 未登入的状态 -->
        <li class="layui-nav-item">
          <a class="iconfont icon-touxiang layui-hide-xs" href="user/login.html"></a>
        </li>
        <li class="layui-nav-item">
          <a href="<?php echo url('home/index/login'); ?>">登入</a></a>
        
        </li>
        <li class="layui-nav-item">
          <a href="<?php echo url('home/index/register'); ?>">注册</a>
        </li>
      <?php endif; ?>
    </ul>
  </div>
</div>

  <!-- 子模板变量 -->
  <!-- 二级菜单 -->
<div class="fly-panel fly-column">
    <div class="layui-container">
        <ul class="layui-clear">
            <li class="layui-hide-xs <?php echo $cateid==0?'layui-this' : ''; ?>"><a href="/">全部</a></li>
            <?php foreach($catelist as $cate): ?>
            <li class="<?php echo $cateid==$cate['id']?'layui-this' : ''; ?>">
                <a href="<?php echo url('home/index/index',['cateid' => $cate['id']]); ?>"><?php echo $cate['name']; ?></a>
            </li>
            <?php endforeach; ?>
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>
            <!-- 用户登入后显示 -->
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a
                    href="<?php echo url('home/post/index'); ?>">我发表的贴</a></li>
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a
                    href="<?php echo url('home/post/collect'); ?>">我收藏的贴</a></li>
        </ul>

        <div class="fly-column-right layui-hide-xs">
            <span class="fly-search"><i class="layui-icon"></i></span>
            <a href="<?php echo url('home/post/add'); ?>" class="layui-btn">发表新帖</a>
        </div>
        <!-- <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;"> 
        <a href="<?php echo url('home/post/add'); ?>" class="layui-btn">发表2新帖</a> 
      </div>  -->
    </div>
</div>

<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md8">
            <div class="fly-panel">
                <div class="fly-panel-title fly-filter">
                    <a>置顶</a>
                    <a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin"
                        style="color: #FF5722;">去签到</a>
                </div>
                <ul class="fly-list">
                    <?php foreach($poststate as $item): if($item['state'] == '1'): ?>
                    <li>
                        <a href="<?php echo url('home/user/index', ['userid' => $item['user']['id']]); ?>" class="fly-avatar">
                            <?php if($item['user']['avatar']): ?>
                            <img src="/<?php echo $item['user']['avatar']; ?>">
                            <?php else: ?>
                            <img src="/assets/home/images/avatar.jpg">
                            <?php endif; ?>
                        </a>
                        <h2>
                            <a class="layui-badge"><?php echo $item['cate']['name']; ?></a>
                            <a href="<?php echo url('home/index/info',['postid' => $item['id']]); ?>"><?php echo $item['title']; ?></a>
                        </h2>
                        <div class="fly-list-info">
                            <a href="user/home.html" link>
                                <cite><?php echo $item['user']['nickname']; ?></cite>
                                <!--
                    <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>
                    <i class="layui-badge fly-badge-vip">VIP3</i>
                    -->
                            </a>
                            <span><?php echo $item['createtime']; ?></span>

                            <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i>
                                <?php echo $item['visit_text']; ?></span>
                            <?php if($item['accept']): ?>
                            <span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>
                            <?php endif; ?>
                            <span class="fly-list-nums">
                                <i class="iconfont icon-pinglun1" title="回答"></i> <?php echo $item['comment']; ?>
                            </span>
                        </div>
                        <div class="fly-list-badge">
                            <?php if($item['state'] != '0'): ?>
                            <span class="layui-badge layui-bg-red"><?php echo $item['state_text']; ?></span>
                            <?php endif; ?>
                        </div>
                    </li>
                    <?php endif; endforeach; ?>
                </ul>
            </div>

            <!-- 帖子列表 -->
            <div class="fly-panel" style="margin-bottom: 0;padding-bottom:2em">
                <div class="fly-panel-title fly-filter">
                    <a href="<?php echo url('home/index/index', ['cateid' => $cateid]); ?>"
                        class="<?php echo $accept==2?'layui-this' : ''; ?>">综合</a>
                    <span class="fly-mid"></span>
                    <a href="<?php echo url('home/index/index',['accept' => 0,'cateid' => $cateid]); ?>"
                        class="<?php echo $accept==0?'layui-this' : ''; ?>">未结</a>
                    <span class="fly-mid"></span>
                    <a href="<?php echo url('home/index/index',['accept' => 1, 'cateid' => $cateid]); ?>"
                        class="<?php echo $accept==1?'layui-this' : ''; ?>">已结</a>
                    <span class="fly-mid"></span>
                </div>

                <ul class="fly-list">
                    <?php foreach($postlist as $item): ?>
                    <li>
                        <a href="<?php echo url('home/user/index', ['userid' => $item['user']['id']]); ?>" class="fly-avatar">
                            <?php if($item['user']['avatar']): ?>
                            <img src="/<?php echo $item['user']['avatar']; ?>">
                            <?php else: ?>
                            <img src="/assets/home/images/avatar.jpg">
                            <?php endif; ?>
                        </a>
                        <h2>
                            <a class="layui-badge"><?php echo $item['cate']['name']; ?></a>
                            <a href="<?php echo url('home/index/info',['postid' => $item['id']]); ?>"><?php echo $item['title']; ?></a>
                        </h2>
                        <div class="fly-list-info">
                            <a href="user/home.html" link>
                                <cite><?php echo $item['user']['nickname']; ?></cite>
                                <!--
                    <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>
                    <i class="layui-badge fly-badge-vip">VIP3</i>
                    -->
                            </a>
                            <span><?php echo $item['createtime']; ?></span>

                            <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i>
                                <?php echo $item['visit_text']; ?></span>
                            <?php if($item['accept']): ?>
                            <span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>
                            <?php endif; ?>
                            <span class="fly-list-nums">
                                <i class="iconfont icon-pinglun1" title="回答"></i> <?php echo $item['comment']; ?>
                            </span>
                        </div>
                        <div class="fly-list-badge">
                            <?php if($item['state'] != '0'): ?>
                            <span class="layui-badge layui-bg-red"><?php echo $item['state_text']; ?></span>
                            <?php endif; ?>
                        </div>
                    </li>
                    <?php endforeach; ?>
                </ul>
                <div>
                    <?php echo $pagestr; ?>
                </div>
            </div>
        </div>
        <div class="layui-col-md4">

            <div class="fly-panel">
                <h3 class="fly-panel-title">温馨通道</h3>
                <ul class="fly-panel-main fly-list-static">
                    <li>
                        <a href="http://fly.layui.com/jie/4281/" target="_blank">layui 的 GitHub 及 Gitee (码云)
                            仓库，欢迎Star</a>
                    </li>
                    <li>
                        <a href="http://fly.layui.com/jie/5366/" target="_blank">
                            layui 常见问题的处理和实用干货集锦
                        </a>
                    </li>
                    <li>
                        <a href="http://fly.layui.com/jie/4281/" target="_blank">layui 的 GitHub 及 Gitee (码云)
                            仓库，欢迎Star</a>
                    </li>
                    <li>
                        <a href="http://fly.layui.com/jie/5366/" target="_blank">
                            layui 常见问题的处理和实用干货集锦
                        </a>
                    </li>
                    <li>
                        <a href="http://fly.layui.com/jie/4281/" target="_blank">layui 的 GitHub 及 Gitee (码云)
                            仓库，欢迎Star</a>
                    </li>
                </ul>
            </div>


            <div class="fly-panel fly-signin">
                <div class="fly-panel-title">
                    签到
                    <i class="fly-mid"></i>
                    <a href="javascript:;" class="fly-link" id="LAY_signinHelp">说明</a>
                    <i class="fly-mid"></i>
                    <a href="javascript:;" class="fly-link" id="LAY_signinTop">活跃榜<span
                            class="layui-badge-dot"></span></a>
                    <span class="fly-signin-days">已连续签到<cite>16</cite>天</span>
                </div>
                <div class="fly-panel-main fly-signin-main">
                    <button class="layui-btn layui-btn-danger" id="LAY_signin">今日签到</button>
                    <span>可获得<cite>5</cite>飞吻</span>

                    <!-- 已签到状态 -->
                    <!--
            <button class="layui-btn layui-btn-disabled">今日已签到</button>
            <span>获得了<cite>20</cite>飞吻</span>
            -->
                </div>
            </div>

            <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank">
                <h3 class="fly-panel-title">回贴周榜</h3>
                <dl>
                    <!--<i class="layui-icon fly-loading">&#xe63d;</i>-->
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                    <dd>
                        <a href="user/home.html">
                            <img
                                src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg"><cite>贤心</cite><i>106次回答</i>
                        </a>
                    </dd>
                </dl>
            </div>

            <dl class="fly-panel fly-list-one">
                <dt class="fly-panel-title">本周热议</dt>
                <dd>
                    <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="jie/detail.html">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>

                <!-- 无数据时 -->
                <!--
          <div class="fly-none">没有相关数据</div>
          -->
            </dl>

            <div class="fly-panel">
                <div class="fly-panel-title">
                    这里可作为广告区域
                </div>
                <div class="fly-panel-main">
                    <a href="http://layim.layui.com/?from=fly" target="_blank" class="fly-zanzhu"
                        time-limit="2017.09.25-2099.01.01" style="background-color: #5FB878;">LayIM 3.0 - layui 旗舰之作</a>
                </div>
            </div>

            <div class="fly-panel fly-link">
                <h3 class="fly-panel-title">友情链接</h3>
                <dl class="fly-panel-main">
                    <dd><a href="http://www.layui.com/" target="_blank">layui</a>
                    <dd>
                    <dd><a href="http://layim.layui.com/" target="_blank">WebIM</a>
                    <dd>
                    <dd><a href="http://layer.layui.com/" target="_blank">layer</a>
                    <dd>
                    <dd><a href="http://www.layui.com/laydate/" target="_blank">layDate</a>
                    <dd>
                    <dd><a href="mailto:xianxin@layui-inc.com?subject=%E7%94%B3%E8%AF%B7Fly%E7%A4%BE%E5%8C%BA%E5%8F%8B%E9%93%BE"
                            class="fly-link">申请友链</a>
                    <dd>
                </dl>
            </div>

        </div>
    </div>
</div>

  <!-- footer文件 -->
  <div class="fly-footer">
    <p><a href="http://fly.layui.com/" target="_blank">Fly社区</a> 2017 &copy; <a href="http://www.layui.com/" target="_blank">layui.com 出品</a></p>
    <p>
      <a href="http://fly.layui.com/jie/3147/" target="_blank">付费计划</a>
      <a href="http://www.layui.com/template/fly/" target="_blank">获取Fly社区模版</a>
      <a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a>
    </p>
  </div>
</body>
</html>